<template>
    <div class="container">
        <div>
            <Swipper></Swipper>
        </div>

        <div class="big-box">
            <div class="tab-header">
            <div class="tab-header-son">
                <div class="tab-header-son-1" @click="tabClick(0)" :class="{ tab2: myTab == 0 }">关注
                    <div :class="fixClass == 0 ? 'fix' : ''"></div>
                </div>
                <div class="tab-header-son-1" @click="tabClick(1)" :class="{ tab2: myTab == 1 }">推荐
                    <div :class="fixClass == 1 ? 'fix' : ''"></div>
                </div>
            </div>
        </div>
        <div class="line"></div>
        <!-- 渲染两种情况 -->
        <div class="content-main" v-if="btnTab == 0">
            <div class="content-main-son">
                <div class="content-main-img">
                    <img src="./../../assets/imgs/实验卡片／配图／1(2).png" alt="">
                </div>
                <div class="content-main-text" :class="{ shadow: myShadow == 0 }">
                    有效绕过黑名单检测，尝试连接，寻找...
                    <div class="content-main-text-bottom">
                        <div class="content-main-text-bottom-1">
                            恶意代码
                            <img src="./../../assets/imgs/icon_zuijiandan.png" alt="">
                        </div>
                        <div class="content-main-text-bottom-2">
                            122人
                        </div>
                    </div>
                </div>
            </div>
            <div class="content-main-son">
                <div class="content-main-img">
                    <img src="./../../assets/imgs/实验卡片／配图／1(2).png" alt="">
                </div>
                <div class="content-main-text" :class="{ shadow: myShadow == 0 }">
                    有效绕过黑名单检测，尝试连接，寻找...
                    <div class="content-main-text-bottom">
                        <div class="content-main-text-bottom-1">
                            恶意代码
                            <img src="./../../assets/imgs/icon_zuijiandan.png" alt="">
                        </div>
                        <div class="content-main-text-bottom-2">
                            122人
                        </div>
                    </div>
                </div>
            </div>
            <div class="content-main-son">
                <div class="content-main-img">
                    <img src="./../../assets/imgs/实验卡片／配图／1(2).png" alt="">
                </div>
                <div class="content-main-text" :class="{ shadow: myShadow == 0 }">
                    有效绕过黑名单检测，尝试连接，寻找...
                    <div class="content-main-text-bottom">
                        <div class="content-main-text-bottom-1">
                            恶意代码
                            <img src="./../../assets/imgs/icon_zuijiandan.png" alt="">
                        </div>
                        <div class="content-main-text-bottom-2">
                            122人
                        </div>
                    </div>
                </div>
            </div>
            <div class="content-main-son">
                <div class="content-main-img">
                    <img src="./../../assets/imgs/实验卡片／配图／1(2).png" alt="">
                </div>
                <div class="content-main-text" :class="{ shadow: myShadow == 0 }">
                    有效绕过黑名单检测，尝试连接，寻找...
                    <div class="content-main-text-bottom">
                        <div class="content-main-text-bottom-1">
                            恶意代码
                            <img src="./../../assets/imgs/icon_zuijiandan.png" alt="">
                        </div>
                        <div class="content-main-text-bottom-2">
                            122人
                        </div>
                    </div>
                </div>
            </div>
            <div class="content-main-son">
                <div class="content-main-img">
                    <img src="./../../assets/imgs/实验卡片／配图／1(2).png" alt="">
                </div>
                <div class="content-main-text" :class="{ shadow: myShadow == 0 }">
                    有效绕过黑名单检测，尝试连接，寻找...
                    <div class="content-main-text-bottom">
                        <div class="content-main-text-bottom-1">
                            恶意代码
                            <img src="./../../assets/imgs/icon_zuijiandan.png" alt="">
                        </div>
                        <div class="content-main-text-bottom-2">
                            122人
                        </div>
                    </div>
                </div>
            </div>
            <div class="content-main-son">
                <div class="content-main-img">
                    <img src="./../../assets/imgs/实验卡片／配图／1(2).png" alt="">
                </div>
                <div class="content-main-text" :class="{ shadow: myShadow == 0 }">
                    有效绕过黑名单检测，尝试连接，寻找...
                    <div class="content-main-text-bottom">
                        <div class="content-main-text-bottom-1">
                            恶意代码
                            <img src="./../../assets/imgs/icon_zuijiandan.png" alt="">
                        </div>
                        <div class="content-main-text-bottom-2">
                            122人
                        </div>
                    </div>
                </div>
            </div>
            <div class="content-main-son">
                <div class="content-main-img">
                    <img src="./../../assets/imgs/实验卡片／配图／1(2).png" alt="">
                </div>
                <div class="content-main-text" :class="{ shadow: myShadow == 0 }">
                    有效绕过黑名单检测，尝试连接，寻找...
                    <div class="content-main-text-bottom">
                        <div class="content-main-text-bottom-1">
                            恶意代码
                            <img src="./../../assets/imgs/icon_zuijiandan.png" alt="">
                        </div>
                        <div class="content-main-text-bottom-2">
                            122人
                        </div>
                    </div>
                </div>
            </div>
            <div class="content-main-son">
                <div class="content-main-img">
                    <img src="./../../assets/imgs/实验卡片／配图／1(2).png" alt="">
                </div>
                <div class="content-main-text" :class="{ shadow: myShadow == 0 }">
                    有效绕过黑名单检测，尝试连接，寻找...
                    <div class="content-main-text-bottom">
                        <div class="content-main-text-bottom-1">
                            恶意代码
                            <img src="./../../assets/imgs/icon_zuijiandan.png" alt="">
                        </div>
                        <div class="content-main-text-bottom-2">
                            122人
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- 渲染第二种 -->
        <div class="content-main" v-else-if="btnTab == 1">
            <div class="content-main-son">
                <div class="content-main-img">
                    <img src="./../../assets/imgs/实验卡片／配图／1(1).png" alt="">
                </div>
                <div class="content-main-text" :class="{ shadow: myShadow == 0 }">
                    有效绕过黑名单检测，尝试连接，寻找...
                    <div class="content-main-text-bottom">
                        <div class="content-main-text-bottom-1">
                            恶意代码
                            <img src="./../../assets/imgs/icon_zuijiandan.png" alt="">
                        </div>
                        <div class="content-main-text-bottom-2">
                            122人
                        </div>
                    </div>
                </div>
            </div>
            <div class="content-main-son">
                <div class="content-main-img">
                    <img src="./../../assets/imgs/实验卡片／配图／1(1).png" alt="">
                </div>
                <div class="content-main-text" :class="{ shadow: myShadow == 0 }">
                    有效绕过黑名单检测，尝试连接，寻找...
                    <div class="content-main-text-bottom">
                        <div class="content-main-text-bottom-1">
                            恶意代码
                            <img src="./../../assets/imgs/icon_zuijiandan.png" alt="">
                        </div>
                        <div class="content-main-text-bottom-2">
                            122人
                        </div>
                    </div>
                </div>
            </div>
            <div class="content-main-son">
                <div class="content-main-img">
                    <img src="./../../assets/imgs/实验卡片／配图／1(1).png" alt="">
                </div>
                <div class="content-main-text" :class="{ shadow: myShadow == 0 }">
                    有效绕过黑名单检测，尝试连接，寻找...
                    <div class="content-main-text-bottom">
                        <div class="content-main-text-bottom-1">
                            恶意代码
                            <img src="./../../assets/imgs/icon_zuijiandan.png" alt="">
                        </div>
                        <div class="content-main-text-bottom-2">
                            122人
                        </div>
                    </div>
                </div>
            </div>
            <div class="content-main-son">
                <div class="content-main-img">
                    <img src="./../../assets/imgs/实验卡片／配图／1(1).png" alt="">
                </div>
                <div class="content-main-text" :class="{ shadow: myShadow == 0 }">
                    有效绕过黑名单检测，尝试连接，寻找...
                    <div class="content-main-text-bottom">
                        <div class="content-main-text-bottom-1">
                            恶意代码
                            <img src="./../../assets/imgs/icon_zuijiandan.png" alt="">
                        </div>
                        <div class="content-main-text-bottom-2">
                            122人
                        </div>
                    </div>
                </div>
            </div>
            <div class="content-main-son">
                <div class="content-main-img">
                    <img src="./../../assets/imgs/实验卡片／配图／1(1).png" alt="">
                </div>
                <div class="content-main-text" :class="{ shadow: myShadow == 0 }">
                    有效绕过黑名单检测，尝试连接，寻找...
                    <div class="content-main-text-bottom">
                        <div class="content-main-text-bottom-1">
                            恶意代码
                            <img src="./../../assets/imgs/icon_zuijiandan.png" alt="">
                        </div>
                        <div class="content-main-text-bottom-2">
                            122人
                        </div>
                    </div>
                </div>
            </div>
            <div class="content-main-son">
                <div class="content-main-img">
                    <img src="./../../assets/imgs/实验卡片／配图／1(1).png" alt="">
                </div>
                <div class="content-main-text" :class="{ shadow: myShadow == 0 }">
                    有效绕过黑名单检测，尝试连接，寻找...
                    <div class="content-main-text-bottom">
                        <div class="content-main-text-bottom-1">
                            恶意代码
                            <img src="./../../assets/imgs/icon_zuijiandan.png" alt="">
                        </div>
                        <div class="content-main-text-bottom-2">
                            122人
                        </div>
                    </div>
                </div>
            </div>
            <div class="content-main-son">
                <div class="content-main-img">
                    <img src="./../../assets/imgs/实验卡片／配图／1(1).png" alt="">
                </div>
                <div class="content-main-text" :class="{ shadow: myShadow == 0 }">
                    有效绕过黑名单检测，尝试连接，寻找...
                    <div class="content-main-text-bottom">
                        <div class="content-main-text-bottom-1">
                            恶意代码
                            <img src="./../../assets/imgs/icon_zuijiandan.png" alt="">
                        </div>
                        <div class="content-main-text-bottom-2">
                            122人
                        </div>
                    </div>
                </div>
            </div>
            <div class="content-main-son">
                <div class="content-main-img">
                    <img src="./../../assets/imgs/实验卡片／配图／1(1).png" alt="">
                </div>
                <div class="content-main-text" :class="{ shadow: myShadow == 0 }">
                    有效绕过黑名单检测，尝试连接，寻找...
                    <div class="content-main-text-bottom">
                        <div class="content-main-text-bottom-1">
                            恶意代码
                            <img src="./../../assets/imgs/icon_zuijiandan.png" alt="">
                        </div>
                        <div class="content-main-text-bottom-2">
                            122人
                        </div>
                    </div>
                </div>
            </div>

        </div>






        </div>


       
    </div>
</template>

<script lang='ts' setup>
import { reactive, ref } from 'vue'
import Swipper from "./../../component/Swipper/Swipper.vue"
const btnTab = ref<number>(0);
const fixClass = ref<number>(0);
const myShadow = ref<number>(0);
const myTab = ref<number>(0);

function tabClick(v: number) {
    btnTab.value = v;
    fixClass.value = v;
    myTab.value = v
}
</script>

<style lang='scss' scoped>
html,
body {
    padding: 0;
    margin: 0;
}
.big-box{
    width: 21.0625rem;
    margin: 0 auto;
}

.container {
    padding-right: 0.75rem;
    padding-left: 0.75rem;
    box-sizing: border-box;
}

.tab-header {
    height: 1.125rem;
    display: flex;
    justify-content: center;
    align-items: center;

    .tab-header-son {
        width: 20%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;

        .tab-header-son-1,
        .tab-header-son-2 {
            width: 50%;
            height: 100%;
            line-height: 1.125rem;
            text-align: center;
            font-size: 0.25rem;
        }

        .tab-header-son-1 {
            color: #7f7f7f;
            font-weight: bold;
            position: relative;

            // border-bottom-color: red;
            // border-bottom-style: solid;
            // border-bottom-width: 0.025rem;
            .fix {
                width: 0.325rem;
                height: 0.325rem;
                border-bottom: 0.0625rem solid #139dff;
                position: absolute;
                bottom: -0.0375rem;
                left: 0.9rem;
            }

        }

        .tab2 {
            color: #222222;
            font-weight: bold;
        }
    }
}

.line {
    border: 0.0125rem solid gray;
    margin-bottom: 0.5rem;
}

.content-main {
    min-height: 1.875rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;

    .content-main-son {
        width: 5.0125rem;
        height: 4.25rem;
        margin-bottom: 0.275rem;

        border-radius: 0.125rem;
        border: 0.0125rem solid rgb(206, 204, 204);

        .content-main-img {
            width: 100%;
            height: 70%;

            img {
                width: 100%;
                height: 100%;
            }
        }

        .content-main-text {
            width: 100%;
            height: 30%;
            padding: 0.1rem;
            box-sizing: border-box;
            font-size: 0.1875rem;
            font-weight: bold;

            .content-main-text-bottom {
                display: flex;
                justify-content: space-between;
                align-items: center;
                width: 100%;
                height: 0.375rem;
                font-size: 0.125rem;
                color: #d8d8d8;
                margin-top: 0.25rem;

                .content-main-text-bottom-1 {
                    display: flex;
                    align-items: center;

                    img {
                        margin-left: 0.1rem;
                    }
                }
            }
        }
    }
}

// .content-main-1{
//     min-height: 12vh;
//     display: flex;
//     justify-content:space-between;
//     align-items: center;
//     flex-wrap: wrap;
//     .content-main-son-1{
//         width: 20vw;
//         height: 2.125rem;
//         margin-bottom: 0.275rem;
//         img{
//             width: 100%;
//             height: 100%;
//         }
//     }
// }
.shadow {
    box-shadow: 0.0375rem 0.0375rem 0.125rem 0.025rem #eeecec, -0.0375rem -0.0375rem 0.125rem 0.025rem #eeecec;
}</style>